<%@ page contentType="text/html" pageEncoding="UTF-8" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<c:set var="contextPath"
	value="${pageContext.servletContext.contextPath}" /> 
<!doctype html>
<html lang="en">
<head>
<title>Create customer</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="${contextPath}/styles/default.css" />
<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

</head>
<body>
	<header>
		<c:import url="/WEB-INF/JSP/menu.jsp" />
		<h1>Create customer</h1>
	</header>
	<c:url value="/customers" var="customersURL" />
	<form:form action="${customersURL}" method="post"
		commandName="customerCreateForm">
		<form:label path="username">Username<form:errors
				path="username" cssClass="error" />

			<form:input path="username" />
		</form:label>
		<form:label path="password">Password<form:errors
				path="password" cssClass="error" />
			<form:password path="password" />
		</form:label>
		<form:label path="confirmPassword">Confirm password<form:errors
				path="confirmPassword" cssClass="error" />
			<form:errors path="confirmPasswordTheSameAsPassword" cssClass="error" />
			<form:password path="confirmPassword" />
		</form:label>
		<input type="submit" value="Create customer" />
	</form:form>
	<script>
		$(function() {
			$("#username").focus();
		});
		</script>
</body>
</html>
